{% extends "personal_center/base.html" %}

{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
    <link rel="stylesheet" href="../../static/personal_center/css/style1.css" media="screen" type="text/css" />
{% endblock %}


{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }
        .top_tag {
            border-bottom: #01AAED solid 2px;color: #01AAED;
        }
        table td {
            padding-right: 10px;
        }
        .tab_top {
            width: 100px;height: 40px;line-height: 40px;text-align: center;display: inline-block;cursor: pointer;
        }
        .shade {
            position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(36, 36, 36, 0.5);display: none;z-index: 10000;
        }
        #page_one button:hover {
            color: red;
        }
        .a_tag_cla {
            display: block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div id="new_models1" class="shade">
        <div id="new_models" style="width: 100%;height: 100%;position: absolute;">
            <div style="width: 500px;height: 200px;background: #F5F5F5;z-index: 10000;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
                <div id="box" style="width: 100%;height: 40px;background: #f4f7fa;cursor: move;border-top-left-radius: 3px;border-top-right-radius: 3px;line-height: 40px;border-bottom: #dfdfdf solid 1px;">
                    <div style="width: 50%;margin-left: 1%;display: inline-block;line-height: 0px;font-size: 14px;">
                        议题投票
                    </div>
                    <span onclick="close_models()" style="float: right;padding-right: 2%;cursor: pointer;">
                        <i class="iconfont icon-quchu"></i>
                    </span>
                </div>
                <div style="height: 115px;width: 100%;border-bottom: #dfdfdf solid 1px;">
                    <div style="width: 100%;margin-top: 3px;height: 40px;line-height: 40px;">
                        <input type="radio" name="vote" value="agree" style="margin-left: 2%;" checked> 同意
                        <input type="radio" name="vote" value="opposition" style="margin-left: 15px;"> 反对
                        <input type="radio" name="vote" value="waiver" style="margin-left: 15px;"> 弃权
                    </div>

                    <div style="margin-top: 3px;">
                        <textarea name="" id="vote_node" style="width: 96%;margin-left: 2%;border: #cfcfcf solid 1px;outline: none;"></textarea>
                    </div>
                </div>
                <div style="width: 100%;height: 40px;text-align: right;padding-right: 2%;">
                    <button id="summit_but" onclick="topic_vote()" style="width: 70px;height: 30px;border: #dfdfdf solid 1px;margin-top: 5px;border-radius: 3px;background: #1E90FF;color: white;line-height: 28px;">
                        {% if modify == 'true' %}
                            修改
                        {% else %}
                            投票
                        {% endif %}
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div style="width: 100%;height: 40px;background: white;border-bottom: #A9A9A9 solid 0.5px;line-height: 40px;padding-left: 1%;color: black;">
        <div id="my_application_tab" onclick="change_mind('my_application')" class="tab_top top_tag">
            议题详情
        </div>
        <div id="new_issues_tab" onclick="change_mind('new_issues')" class="tab_top">
            议题附件
        </div>
        <div id="vote_tab" onclick="change_mind('vote')" class="tab_top">
            投票详情
        </div>

        <div style="float: right;text-align: center;margin-right: 6px;height: 40px;padding-right: 1%;">
            <a style="font-size: 16px;color: #00a0e9;" {% if voting_flag == 'true' %} href="javascript:;" onclick="location.href=('/personal-center/TopicDeliberation.html?type={{ types }}')" {% endif %} href="javascript:history.go(-1)">返回</a>
            <img src="../../static/personal_center/img/返回.png" alt="" style="width: 17px;height: 17px;margin-top: -3px;">
        </div>

        {% if top_flag == 'true' or modify == 'true' %}
            <div id="" style="width: 100px;float: right;text-align: center;margin-right: 1%;height: 40px;">
                <button onclick="line_table()" style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 70px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;">
                    {% if modify == 'true' %}
                        修改
                    {% else %}
                        投票
                    {% endif %}
                </button>
            </div>
        {% endif %}
    </div>

    <div id="my_application" style="width: 100%;height: 95.5%;background-color: white;position: relative;">
        <div style="width: 100%;height: 40px;line-height: 40px;text-align: center;">
            <div style="width: 33%;height: 100%;display: inline-block;vertical-align: top;text-align: left;padding-left: 4.8%;">
                {% if UpperNextDict.upper.status == 'true' %}
                    <a href="/supervision-inspection/topic_voting_details.html?id={{ UpperNextDict.upper.topic_id }}"><button style="width: 100px;height: 30px;margin-top: 5px;border-radius: 3px;border: #00a0e9 solid 1px;color: #00a0e9;line-height: 27px;background: white;"><img src="../../static/personal_center/img/上一个.png" alt="" style="width: 17px;height: 17px;margin-top: -1px;">上一议题</button></a>
                    <span><a href="/supervision-inspection/topic_voting_details.html?id={{ UpperNextDict.upper.topic_id }}" style="color: #999999;font-size: 14px;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;vertical-align: top;" title="{{ UpperNextDict.upper.topics_name }}"><strong>{{ UpperNextDict.upper.topics_name }}</strong></a></span>
                {% else %}
                    <a href="javescript:;"><button style="width: 100px;height: 30px;margin-top: 5px;border-radius: 3px;border: #00a0e9 solid 1px;color: #00a0e9;line-height: 27px;background: white;"><img src="../../static/personal_center/img/上一个.png" alt="" style="width: 17px;height: 17px;margin-top: -1px;">上一议题</button></a>
                <span><a href="javescript:;" style="color: #999999;font-size: 14px;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;vertical-align: top;"><strong>没有上一个议题了！</strong></a></span>
                {% endif %}
            </div>
            <div style="width: 33%;height: 100%;display: inline-block;vertical-align: top;"><h3 id="h_title">委员会议题</h3></div>
            <div style="width: 33%;height: 100%;display: inline-block;vertical-align: top;text-align: right;padding-right: 4.8%;">
                {% if UpperNextDict.next.status == 'true' %}
                    <span><a href="/supervision-inspection/topic_voting_details.html?id={{ UpperNextDict.next.topic_id }}" style="color: #999999;font-size: 14px;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;vertical-align: top;" title="{{ UpperNextDict.next.topics_name }}"><strong>{{ UpperNextDict.next.topics_name }}</strong></a></span>
                    <a href="/supervision-inspection/topic_voting_details.html?id={{ UpperNextDict.next.topic_id }}"><button style="width: 100px;height: 30px;margin-top: 5px;border-radius: 3px;border: #00a0e9 solid 1px;color: #00a0e9;line-height: 27px;background: white;">下一议题<img src="../../static/personal_center/img/下一个.png" alt="" style="width: 17px;height: 17px;margin-top: -3px;"></button></a>
                {% else %}
                    <span><a href="javescript:;" style="color: #999999;font-size: 14px;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;vertical-align: top;"><strong>没有下一个议题了！</strong></a></span>
                    <a href="javescript:;"><button style="width: 100px;height: 30px;margin-top: 5px;border-radius: 3px;border: #00a0e9 solid 1px;color: #00a0e9;line-height: 27px;background: white;">下一议题<img src="../../static/personal_center/img/下一个.png" alt="" style="width: 17px;height: 17px;margin-top: -3px;"></button></a>
                {% endif %}
            </div>
        </div>
        <hr>
        <div style="width: 100%;height: 95%;margin-top: 0.5px;overflow: auto;">
            <div style="width: 100%;">
                <table style="width: 90%;margin-left: 5%;">
                    <tr style="width: 100%;">
                        <td colspan="4" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">基本信息</td>
                    </tr>
                    <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                提&nbsp;&nbsp;交&nbsp;人
                            </td>
                            <td style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                {{ obj.apply_user.real_name }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                提交科室
                            </td>
                            <td style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.company.name }}</td>
                        </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">
                            议题编号
                        </td>
                        <td id="number" colspan="3"
                            style="width: 35%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;">{{ obj.number }}</td>
                    </tr>
                    <tr>
                        <td colspan="4" style="width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #F5F5F5;color: #1E90FF;border-left: #cfcfcf solid 0.5px;border-right: #cfcfcf solid 0.5px;">申请详情</td>
                    </tr>

                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">
                            委员会类型
                        </td>
                        <td style="width: 35%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;outline: none;">
                            {% if is_edit == 'true' %}
                                <select name="" id="committee_type" style="width: 100%;height: 100%;border: none;outline: none;">
                                    <option value="0">请选择委员会类型</option>
                                    <option value="1" {% if obj.committee_type == '1' %}selected{% endif %}>医疗类</option>
                                    <option value="2" {% if obj.committee_type == '2' %}selected{% endif %}>非医疗类</option>
                                </select>
                            {% else %}
                                {% if obj.committee_type == '1' %}
                                    医疗类
                                {% else %}
                                    非医疗类
                                {% endif %}
                            {% endif %}
                        </td>
                        <td style="width: 12%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">
                            委员会级别
                        </td>
                        <td style="width: 20%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;">
                            {% if is_edit == 'true' %}
                                <select name="" id="committee" style="width: 100%;height: 100%;border: none;outline: none;" onchange="choose_committee()">
                                    <option value="0">请选择委员会级别</option>
                                    {% for key,val in committee_dict.items %}
                                        <option value="{{ key }}" {% if obj.committee_level == key %}selected{% endif %}>{{ key }}</option>
                                    {% endfor %}
                                </select>
                            {% else %}
                                {{ obj.committee_level }}
                            {% endif %}
                        </td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                            专&nbsp;&nbsp;&nbsp;家&nbsp;&nbsp;&nbsp;库
                        </td>
                        <td colspan="3" style="width: 85%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">
                            {% if is_edit == 'true' %}
                                <select name="" id="expert_database" style="width: 100%;height: 100%;border: none;outline: none;" onchange="select_topic_type()">
                                    <option value="0">请选择专家库</option>
                                    {% for expert in expert_obj %}
                                        <option value="{{ expert.id }}" {% if obj.expert_database.id == expert.id %}selected{% endif %}>{{ expert.name }}</option>
                                    {% endfor %}
                                </select>
                            {% else %}
                                {{ obj.expert_database.name }}
                            {% endif %}
                        </td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">议&nbsp;题&nbsp;名&nbsp;称</td>
                        <td colspan="3" id="topic_name" style="width: 85%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.topic_name }}</td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            委员会名称
                        </td>
                        <td colspan="3" style="width: 85%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">
                            {{ obj.committee_name.committee_name }}
                        </td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">协&nbsp;办&nbsp;科&nbsp;室</td>
                        <td id="dang_xieban" colspan="3" style="width: 85%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;">{{ organizing_department }}</td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 35px;line-height: 35px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1.2px;">
                            备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注
                        </td>
                        <td id="note" colspan="3" style="width: 85%;height: 35px;line-height: 35px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.note }}</td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            议&nbsp;题&nbsp;简&nbsp;述
                        </td>
                        {% if is_edit == 'true' %}
                            <div id="jj_fa_yj" style="width: 100%;">
                                <script id="editor2" type="text/plain" style="width:94.9%;height:300px;margin-left: 5%;outline: none;"></script>
                            </div>
                        {% else %}
                            <td colspan="5" style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;">
                                {% autoescape off %}
                                    {{ topic_description }}
                                {% endautoescape %}
                            </td>
                        {% endif %}
                    </tr>
                    <tr id="yt_yj" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                        <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            政&nbsp;策&nbsp;依&nbsp;据<br>或&nbsp;调&nbsp;研&nbsp;论<p style="letter-spacing: 2.5px;">证&nbsp;&nbsp;情&nbsp;&nbsp;况</p>
                        </td>
                        <td id="ytyj" colspan="5" style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;">
                            {% autoescape off %}
                                {{ policy_basis }}
                            {% endautoescape %}</td>
                    </tr>
                    <tr id="jj_fa" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                            <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                拟&nbsp;供&nbsp;选&nbsp;择
                                <p style="letter-spacing: 5px;">方&nbsp;&nbsp;&nbsp;&nbsp;案</p>
                            </td>
                            <td id="jjfa" colspan="5" style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;">
                                {% autoescape off %}
                                    {{ proposed_options }}
                                {% endautoescape %}</td>
                        </tr>
                </table>
                <table style="width: 90%;margin-left: 5%;">
                    <tr>
                        <td colspan="4" style="width: 90%;height: 40px;margin-left: 5%;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 0.5px;padding-right: 1%;border-top: none;">
                            审批详情
                        </td>
                    </tr>
                    {% if 'one' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                委员会办公室
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'one' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'two' in audit_dic %}
                        <tr  style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4px;">
                                副主任委员
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'two' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'three' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                主&nbsp;&nbsp;任&nbsp;&nbsp;委&nbsp;&nbsp;员
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'three' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}
                </table>
            </div>
        </div>
    </div>

    <div id="new_issues" style="width: 100%;height: 94%;overflow: auto;display: none;background-color: white;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                附件
            </div>
            <div id="yt_zhengwen" style="width: 100%;">
                {% for item in file_list %}
                    <div><a href="javascript:;" class="a_tag_cla" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                {% endfor %}
            </div>
        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in file_path or 'JPG' in file_path or 'JPEG' in file_path or 'jpeg' in file_path or 'PNG' in file_path or 'png' in file_path %}
                <img src="{{ file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>
    <div id="vote" style="width: 100%;height: 94.5%;display: none;position: relative">
        <div class="right-box" style="width: 100%;height: 100%;margin-top: 0;background-color: #00a0e9;">
            <div style="height: 100%;width: 100%;overflow: auto;background-color: white;">
                <div style="width: 100%;height: 63%;">
                    <div style="width: 100%;height: 82%;background: white;">
                        <div style="background: #00a0e9;color: white;padding-left: 1%;height: 40px;line-height: 40px;width: 100%;">投票汇总</div>
                        <div style="overflow: auto;width: 100%;height: 90%;">
                            <table class="table table-hover table-bordered" style="border-collapse: collapse;width: 100%;table-layout:fixed;">
                                <tr>
                                    <th style="height: 35px;text-align: center;">投票人</th>
                                    <th style="height: 35px;text-align: center;">投票结果</th>
                                    <th style="height: 35px;text-align: center;">投票时间</th>
                                    <th style="height: 35px;text-align: center;">投票意见</th>
                                </tr>
                                <tbody style="overflow: auto;" id="vote_body">
                                    {% for vote in all_list %}
                                        <tr>
                                            <td style="text-align: center;height: 35px;">{{ vote.real_name }}</td>
                                            <td style="text-align: center;height: 35px;">{{ vote.vote_reluse }}</td>
                                            <td style="text-align: center;height: 35px;">{{ vote.vote_time }}</td>
                                            <td style="padding-left: 5px;height: 35px;">{{ vote.vote_node }}</td>
                                        </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                        </div>
                        <div id="img-display" style="width: 75%;text-align: center;position: fixed;display: none;">
                            <div style="margin-top: 10%;">
                                <img src="../../static/public_file/images/page-img/11.jpg" alt="">
                                <p style="margin: 0;padding: 0;vertical-align: top;">暂无数据</p>
                            </div>
                        </div>
                    </div>
                    <div style="width: 100%;height: 25%;overflow: auto;background: #DFDFDF;">
                        <div style="vertical-align: top;display: inline-block;width: 49%;height: 90%;background: white;margin-left: 0.3%;margin-top: 5px;">
                            <div style="height: 35px;width: 100%;background: #00a0e9;color: white;padding-left: 1%;line-height: 35px;">
                                请假人员
                            </div>
                            <div style="width: 100%;vertical-align: top;height: 68%;display: flex;align-items:center;justify-content:center;">
                                {% if not_attending_the_meeting %}
                                    {% if no_join_meet == "true" %}
                                        <div style="width: 49%;vertical-align: top;display: inline-block;height: 100%;padding-left: 1%;padding-top: 1%;">
                                            {{ not_meeting_reason }}
                                        </div>
                                    {% else %}
                                        <div style="width: 50%;vertical-align: top;display: inline-block;height: 100%;border-right: #cfcfcf solid 0.5px;padding-left: 1%;padding-top: 1%;">
                                            {{ not_attending_the_meeting }}
                                        </div>
                                        <div style="width: 49%;vertical-align: top;display: inline-block;height: 100%;padding-left: 1%;padding-top: 1%;">
                                            {{ not_meeting_reason }}
                                        </div>
                                    {% endif %}
                                {% else %}
                                    <div style="width: 150px;height: 70px;left:50%;top:50%;text-align: center;">
                                        <img src="../../static/public_file/images/暂无数据.png" alt="" style="width: 50px;height: 50px;">
                                        <p style="color: #cfcfcf;">暂无数据</p>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                        <div style="vertical-align: top;display: inline-block;width: 49%;height: 90%;background: white;margin-left: 2px;margin-top: 5px;">
                            <div style="height: 35px;width: 100%;background: #00a0e9;color: white;padding-left: 1%;line-height: 35px;">
                                主持人
                            </div>
                            <div style="width: 100%;height: 68%;text-align: center;padding-top: 5%;">
                                <strong style="font-size: 20px;">{{ host_people }}</strong>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="width: 70%;height: 220px;padding-left: 20px;padding-top: 40px;">
                    <div style="width: 100%;height: 100px;line-height: 30px;">
                        <strong style="font-size: 20px;">已投票人数：{{ VotersNumber }} 人</strong>
                        <p style="font-size: 10px;color: #cfcfcf;">参会人数：{{ meet_leaders }} 人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;应投票人数：{{ all_people_count }} 人</p>
                    </div>
                    <div class="skillbar clearfix " data-percent="{{ agree_number }}%">
                        <div class="skillbar-title" style="background: #27ae60;"><span>通过</span></div>
                        <div class="skillbar-bar" style="background: #2ecc71;"></div>
                        <div class="skill-bar-percent" style="color: #2ecc71;">{{ agree_number }}%</div>
                    </div> <!-- End Skill Bar -->

                    <div class="skillbar clearfix " data-percent="{{ opposition_number }}%">
                        <div class="skillbar-title" style="background: indianred;"><span>反对</span></div>
                        <div class="skillbar-bar" style="background: red;"></div>
                        <div class="skill-bar-percent" style="color: red;">{{ opposition_number }}%</div>
                    </div> <!-- End Skill Bar -->

                    <div class="skillbar clearfix " data-percent="{{ waiver_number }}%">
                        <div class="skillbar-title" style="background: yellowgreen"><span>弃权</span></div>
                        <div class="skillbar-bar" style="background: #c6ba0c;"></div>
                        <div class="skill-bar-percent">{{ waiver_number }}%</div>
                    </div> <!-- End Skill Bar -->
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script type="text/javascript" src='../../static/personal_center/js/jquery1.js'></script>
    <script type="text/javascript" src="../../static/personal_center/js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="../../static/personal_center/js/jquery.jqprint-0.3.js"></script>
    <script src="../../static/personal_center/js/echarts.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("supervision_inspection_management").className = "add-nav-active";
        };

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        function change_mind(ele_id) {
            if (ele_id === "my_application") {
                document.getElementById("my_application").style.display = "inline-block";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top top_tag";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("vote").style.display = "none";
                document.getElementById("vote_tab").className = "tab_top";
            } else if (ele_id === "new_issues") {
                document.getElementById("new_issues").style.display = "inline-block";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("new_issues_tab").className = "tab_top top_tag";
                document.getElementById("vote").style.display = "none";
                document.getElementById("vote_tab").className = "tab_top";
            }else if (ele_id === 'vote'){
                document.getElementById("vote").style.display = "inline-block";
                document.getElementById("vote_tab").className = "tab_top top_tag";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("new_issues_tab").className = "tab_top";
            }else {
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("vote").style.display = "none";
                document.getElementById("vote_tab").className = "tab_top";
            }
        }

        let title = document.querySelector("#box");
        let addForm = document.querySelector("#new_models");

        title.addEventListener("mousedown", function (e) {
            let x = e.pageX - addForm.offsetLeft;
            let y = e.pageY - addForm.offsetTop;

            document.addEventListener("mousemove", move);

            function move(e) {
                addForm.style.left = e.pageX - x + 'px';
                addForm.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        function close_models() {
            document.getElementById("new_models1").style.display = "none";
        }

        function line_table() {
            var modifys = '{{ modify }}';
            if (modifys === 'true') {
                var my_state = '{{ my_state }}';
                var my_node = `{{ my_node | safe }}`
                if (my_state === 'agree') {
                    document.getElementsByName('vote')[0].checked = true;
                }else if (my_state === 'opposition') {
                    document.getElementsByName('vote')[1].checked = true;
                }else {
                    document.getElementsByName('vote')[2].checked = true;
                }
                document.getElementById('vote_node').value = my_node;
            }
            document.getElementById("new_models1").style.display = "table-row";
        }

        function topic_vote() {
            var DeanFlag = "{{ DeanFlag | safe }}";
            var topic_id = window.location.href.split("id=")[1].replace("#", '');
            var vote_node = document.getElementById("vote_node").value;         // 投票意见
            var vote_reluse = $("input[type=radio][name=vote]:checked").val();      // 投票结果
            if (vote_reluse === 'opposition'){
                if (!vote_node) {
                    alert("请您填写反对的原因！")
                    return false
                }
            }
            if (DeanFlag === "false") {
                if (vote_reluse === 'waiver'){
                    if (!vote_node) {
                        alert("请您填写弃权的原因！")
                        return false
                    }
                }
            }
            console.log(topic_id, vote_node, vote_reluse)
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/supervision-inspection/topic_voting_details.html");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send("topic_id="+String(topic_id)+"&vote_node="+String(vote_node)+"&vote_reluse="+String(vote_reluse));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate['code'] !== 200){
                            alert(JsonDate['msg'])
                            return false
                        }
                        alert("操作成功！")
                        window.location.reload();
                    }
                }
             };
        }

        $('.skillbar').each(function(){
            $(this).find('.skillbar-bar').animate({
                width:$(this).attr('data-percent')
            },3000);
        });
    </script>
{% endblock %}
